using System;

namespace StaticMembersExample // 命名空间
{
    // 定义一个静态类
    public static class MathUtilities
    {
        // 静态成员：常量
        public const double Pi = 3.14159;

        // 静态方法：计算圆的面积
        public static double CalculateCircleArea(double radius)
        {
            return Pi * radius * radius;
        }

        // 静态方法：计算矩形的面积
        public static double CalculateRectangleArea(double width, double height)
        {
            return width * height;
        }
    }

    public class Program
    {
        public static void Main(string[] args)
        {
            // 使用静态类的静态成员和方法
            double radius = 5;
            double circleArea = MathUtilities.CalculateCircleArea(radius);
            Console.WriteLine($"Circle Area with Radius {radius}: {circleArea}"); // 输出: Circle Area with Radius 5: 78.53975

            double width = 4, height = 6;
            double rectangleArea = MathUtilities.CalculateRectangleArea(width, height);
            Console.WriteLine($"Rectangle Area with Width {width} and Height {height}: {rectangleArea}"); // 输出: Rectangle Area with Width 4 and Height 6: 24
        }
    }
}
